package ${basepackage};
<#assign className = table.className>   
<#assign classNameLower = className?uncap_first> 
import java.io.Serializable;
import java.util.List;
<#list table.importPacks as importpack>
import ${importpack};
</#list>
import com.baomidou.mybatisplus.annotations.TableField;
<#list table.relationTables as rtable1>
import ${basepackage}.${rtable1.className};
</#list>

public class ${className} implements Serializable{
	
	<#list table.fileds as column>
	private ${column.javaType} ${column.columnNameFirstLower};
	</#list>
	<#list table.relationTables as rtable1>
    @TableField(exist=false)
    <#if (rtable1.isList>=1)>
    private List<${rtable1.className}>	${rtable1.className?uncap_first}s;
	<#else>
    private ${rtable1.className}	${rtable1.className?uncap_first};
	</#if>
	</#list>

<@generateJavaColumns/>

<#macro generateJavaColumns>
	<#list table.fileds as column>
	<#assign _javaType = column.javaType>

	<#if (_javaType == 'Boolean')>
	public ${_javaType} is${column.name}() {
		return this.${column.columnNameFirstLower};
	}
	<#else>
	public ${_javaType} get${column.name}() {
		return this.${column.columnNameFirstLower};
	}
	</#if>
	public void set${column.name}(${_javaType} ${column.columnNameFirstLower}) {
		this.${column.columnNameFirstLower} = ${column.columnNameFirstLower};
	}
	</#list>

	<#list table.relationTables as rtable1>
		<#assign _javaType1 = rtable1.className>
		<#assign _javaTypeList = (rtable1.isList>=1)?string("List<"+rtable1.className+">",rtable1.className)>
		<#assign _name1 = (rtable1.isList>=1)?string(rtable1.className?uncap_first+"s",rtable1.className?uncap_first)>
    public ${_javaTypeList} get${_javaType1}() {
       	 return this.${_name1};
    }

	public void set${_javaType1}( ${_javaTypeList} ${_name1}) {
		this.${_name1} = ${_name1};
	}
	</#list>
</#macro>
}
